<?php if ($this->getPagination()->getTotalPages() > 1): ?>
<div class="paginationControl">
<!-- Previous page link -->
<?php if ($this->getPagination()->getPrevPage()): ?>
	<?php if (isset($_GET['category_id'])): ?>
		<a href="<?php echo Epic::getCurrentUrl(array('category_id' => $_GET['category_id'], 'page' =>  $this->getPagination()->getPrevPage())); ?>">&lt; Previous</a> |
	<?php else: ?>
  		<a href="<?php echo Epic::getCurrentUrl(array('page' =>  $this->getPagination()->getPrevPage())); ?>">&lt; Previous</a> |
	<?php endif; ?>
<?php else: ?>
  	<span>&lt; Previous</span> |
<?php endif; ?>

<!-- Numbered page links -->
<?php foreach ($this->getPagination()->getPages() as $page): ?>
  	<?php if ($page != $this->getPagination()->getCurrentPage()): ?>
  		<?php if (isset($_GET['category_id'])): ?>
			<a href="<?php echo Epic::getCurrentUrl(array('category_id' => $_GET['category_id'], 'page' => $page)); ?>"><?php echo $page; ?></a> |
		<?php else: ?>
	  		<a href="<?php echo Epic::getCurrentUrl(array('page' => $page)); ?>"><?php echo $page; ?></a> |
		<?php endif; ?>
  	<?php else: ?>
    	<?php echo $page; ?> |
  	<?php endif; ?>
<?php endforeach; ?>
 
<!-- Next page link -->
<?php if ($this->getPagination()->getNextPage()): ?>
	<?php if (isset($_GET['category_id'])): ?>
		<a href="<?php echo Epic::getCurrentUrl(array('category_id' => $_GET['category_id'], 'page' =>  $this->getPagination()->getNextPage())); ?>">Next &gt;</a>
	<?php else: ?>
  		<a href="<?php echo Epic::getCurrentUrl(array('page' =>  $this->getPagination()->getNextPage())); ?>">Next &gt;</a>
	<?php endif; ?>
<?php else: ?>
  	<span>Next &gt;</span>
<?php endif; ?>

<div>Trang: <?php echo $this->getPagination()->getCurrentPage(); ?>/<?php echo $this->getPagination()->getTotalPages(); ?></div>

</div>
<?php endif; ?>